package com.lrm.dao;

import com.lrm.pojo.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2017/11/30.
 * @Modified By:
 */
public interface TagJPA extends JpaRepository<Tag,Long>{
    Tag findByName(String name);

    /**
     * 查询首页tag标签list
     * @param pageable
     * @return
     */
    @Query("select t from Tag t")
    List<Tag> listTag(Pageable pageable);
}
